<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电商首页</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        header {
            background-color: #333;
            color: white;
            padding: 10px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
        }
        header .logo {
            font-size: 24px;
            font-weight: bold;
        }
        header .search-bar input {
            padding: 5px;
            width: 250px;
        }
        nav {
            list-style-type: none;
            display: flex;
            gap: 15px;
        }
        nav li {
            display: inline;
            margin: 0 10px;
        }
        nav a {
            color: white;
            text-decoration: none;
        }
        .hero-section {
            background: url('https://via.placeholder.com/1600x600') no-repeat center center/cover;
            height: 400px;
            color: white;
            text-align: center;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .hero-section h1 {
            font-size: 50px;
        }
        .hero-section button {
            padding: 10px 20px;
            font-size: 18px;
            background-color: #ff6f61;
            color: white;
            border: none;
            cursor: pointer;
        }
        .hero-section button:hover {
            background-color: #ff4c3b;
        }
        .categories, .featured-products, .promotions, .reviews {
            padding: 50px 20px;
            text-align: center;
        }
        .categories h2, .featured-products h2, .promotions h2, .reviews h2 {
            font-size: 32px;
            margin-bottom: 20px;
        }
        .categories img, .featured-products img {
            width: 150px;
            height: 150px;
            object-fit: cover;
            border-radius: 10px;
        }
        .categories div, .featured-products div {
            display: inline-block;
            margin: 10px;
            text-align: center;
        }
        .product-card {
            border: 1px solid #ddd;
            padding: 20px;
            margin: 10px;
            width: 200px;
            display: inline-block;
            text-align: center;
        }
        .product-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }
        .product-card h3 {
            font-size: 18px;
            margin: 10px 0;
        }
        .product-card p {
            color: #888;
            font-size: 16px;
        }
        .footer {
            background-color: #333;
            color: white;
            padding: 20px;
            text-align: center;
        }
        .footer a {
            color: white;
            text-decoration: none;
            margin: 0 10px;
        }
    </style>
</head>
<body>
    <header>
        <div class="logo">电商网站</div>
        <div class="search-bar">
            <input type="text" placeholder="搜索商品...">
        </div>
        <nav>
            <li><a href="#">首页</a></li>
            <li><a href="#">产品</a></li>
            <li><a href="/login.html">登录</a></li>
            <li><a href="/register.html">注册</a></li>
        </nav>
    </header>

    <section class="hero-section">
        <h1>欢迎来到我们的电商平台</h1>
        <button>立即购买</button>
    </section>

    <section class="categories">
        <h2>产品分类</h2>
        <div>
            <img src="https://via.placeholder.com/150" alt="分类1">
            <p>家电</p>
        </div>
        <div>
            <img src="https://via.placeholder.com/150" alt="分类2">
            <p>服饰</p>
        </div>
        <div>
            <img src="https://via.placeholder.com/150" alt="分类3">
            <p>食品</p>
        </div>
        <div>
            <img src="https://via.placeholder.com/150" alt="分类4">
            <p>美妆</p>
        </div>
    </section>

    <section class="featured-products">
        <h2>热销产品</h2>
        <div class="product-card">
            <img src="https://via.placeholder.com/200" alt="产品1">
            <h3>产品名称 1</h3>
            <p>¥199.99</p>
        </div>
        <div class="product-card">
            <img src="https://via.placeholder.com/200" alt="产品2">
            <h3>产品名称 2</h3>
            <p>¥299.99</p>
        </div>
        <div class="product-card">
            <img src="https://via.placeholder.com/200" alt="产品3">
            <h3>产品名称 3</h3>
            <p>¥399.99</p>
        </div>
    </section>

    <section class="promotions">
        <h2>促销活动</h2>
        <p>限时折扣！立享7折优惠！</p>
        <button>查看优惠</button>
    </section>

    <section class="reviews">
        <h2>用户评价</h2>
        <p>"这家网站真的很棒，商品质量很好，配送也很快！" - 用户A</p>
        <p>"我超喜欢这里的折扣活动，每次都能买到心仪的商品！" - 用户B</p>
    </section>

    <footer class="footer">
        <p>&copy; 2025 电商网站 | <a href="#">隐私政策</a> | <a href="#">联系我们</a></p>
    </footer>
</body>
</html>


<!-----默认首页 ---- >